<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>事件绑定</title>
    <script src="vue.js"></script>
</head>
<body>
<div id="app">
    <input type="text" v-model="info">
    <!-- v-on:事件名="方法名"，绑定事件-->
    <button v-on:click="f()" type="button">点击</button>
    <!--简写：@事件名="方法名"-->
    <button @click="f()" type="button">点击</button>
</div>
<script>
    let v = new Vue({
        el: '#app',
        data: {
            info: "123"
        },
        methods: {
            f() {
                alert("hello vue");
            }
        }
    })
</script>
</body>
</html>